Repository navigation
feat(inventory): show attached charm value separately from item price - #95
Merged
Merged
Conversation
- Sum priced charms attached to weapons into a charms value, shown as "+ X" on grid cards and table price cells - Add a Charms stat to the portfolio hero; excluded from total value so loose charms are not double counted - routeTree.gen.ts has formatter-only churn (quotes, semicolons) from regeneration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Weapons with priced charms attached now show that charm value next to the item price, without changing the item's price or the headline total.
+ $Xline appears under the price when at least one attached charm is priced. Unpriced charms are skipped.buildDashboardreturnstotals.charmsValue. It is not added tototals.value, so the value history stays comparable with snapshots recorded before this change.Charm value is kept out of the total on purpose. Counting it would shift the history line, and the total then wouldn't match what the weapons sell for on their own. Changing that is a separate decision.
How I verified it
Checks run on the working tree before this commit. They have not been re-run on the committed state.
vp check: 0 errors, 4 warnings (existing build-chunk warnings).pnpm test: 302 of 302 pass. This includes new unit tests insrc/lib/items/charm-value.test.tsand a dashboard test assertingcharmsValueis summed, ignores unpriced charms and leavestotals.valueunchanged.pnpm build: succeeds.pnpm exec tsc -b. Run it before merging.Review note:
src/routeTree.gen.tschanged in this commit in formatting only (quote style and semicolons) because the generator output differs from the formatter config. The file is generated, so consider regenerating it with the repo's formatter or excluding it from the diff before merge.pnpm exec tsc -b && vp check && pnpm testpassdevelop